﻿<%@ Page Language="c#" CodeBehind="approve.aspx.cs" MasterPageFile="~/App_MasterPages/layout.Master"
    AutoEventWireup="false" Inherits="ud_gSDMS.timesheet.approve" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ContentPlaceHolderID="leftContent" ID="MPLeftPane" runat="server" />
<asp:Content ContentPlaceHolderID="mainContent" ID="MPContent" runat="server">

<portal:mojoPanel ID="mp1" runat="server" ArtisteerCssClass="art-Post" RenderArtisteerBlockContentDivs="true">
    <mp:CornerRounderTop id="ctop1" runat="server" />
    <asp:Panel ID="pnlStoreManager" runat="server" CssClass="art-Post-inner panelwrapper gSDMS">
            <portal:ModuleTitleControlCustom ID="moduleTitle" runat="server" RenderArtisteer="true" UseLowerCaseArtisteerClasses="true"/>
            
            <script language="javascript" type="text/javascript">
                function itemSelected() {
                    if (document.getElementById("cbProjectCode") == null) 
                    {
                         alert('Ban chua chon...........');
                        return false;
                    }
                    else {
                        alert('Ban da chon...........');
                        return true;
                    }
                }
            </script>

        <portal:mojoPanel ID="MojoPanel1" runat="server" ArtisteerCssClass="art-PostContent">
        <div class="modulecontent">
            <fieldset>
         <div class="div_title">
                    <a href="/gSDMSModule/timesheet/list.aspx?pageid=16">Timesheet</a>
                    &nbsp;>&nbsp;
                    <a href="">Approve</a>
                </div>
                <br />
                <div class="div_Edit div_search">
                    <table cellpadding='5' cellspacing='0' border='0' class="tb_search" >
                        <tr>
                            <td class="title">From date:</td>
                            <td class="input"> 
                                <telerik:RadDatePicker ID="datTimeSheet_Date_from" runat="server" 
                                        DateInput-DateFormat="dd/MM/yyyy" DateInput-CssClass="txtInput" DateInput-MaxLength="10" 
                                        DatePopupButton-Width="23px" DatePopupButton-Height="23px" 
                                >
                                    <Calendar>
                                        <SpecialDays>
                                            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday" />
                                        </SpecialDays>
                                    </Calendar>
                                </telerik:RadDatePicker>
            
                            </td>
                            
                            <td class="title">To date:</td>
                            <td class="input"> 
                                <telerik:RadDatePicker ID="datTimeSheet_Date_to" runat="server" 
                                        DateInput-DateFormat="dd/MM/yyyy" DateInput-CssClass="txtInput" DateInput-MaxLength="10" 
                                        DatePopupButton-Width="23px" DatePopupButton-Height="23px"
                                >
                                    <Calendar>
                                        <SpecialDays>
                                            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday" />
                                        </SpecialDays>
                                    </Calendar>
                                </telerik:RadDatePicker>

                            </td>
                            <td class="title">Project Leader:</td>
                            <td class="input">
                                <telerik:RadComboBox ID="cboLeader" AllowCustomText="true" runat="server" CssClass ="cbo_rad" Width="80" EmptyMessage="" Filter="Contains">
                                </telerik:RadComboBox>
                            </td>
                            </tr>
                         <tr>
                            <td class="title">Project Code:</td>
                            <td class="input">
                                <telerik:RadComboBox ID="cbProjectCode" AllowCustomText="true" runat="server" CssClass ="cbo_rad"  Width="300px"  EmptyMessage="" Filter="Contains" AutoPostBack="true" OnSelectedIndexChanged="itemSelected">
                                </telerik:RadComboBox>
                            </td>
                            <td class="title">Account:</td>
                            <td class="input">
                                <telerik:RadComboBox ID="cboAccount" AllowCustomText="true" runat="server" CssClass="cbo_rad" EmptyMessage="" Filter="Contains" ></telerik:RadComboBox>
                            </td>
                            
                            <td class="title">Status:</td>
                            <td class="input">
                                <telerik:RadComboBox ID="cboWorkStatus" AllowCustomText="true" runat="server" CssClass ="cbo_rad" Width="80" EmptyMessage="" Filter="Contains">
                                </telerik:RadComboBox>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <asp:ImageButton ID='btnSearch' runat="server" ImageAlign="Left" ImageUrl="~/Data/Sites/1/skins/StandardSkin/images/search.png" Width="82px" Height="23px" />
                            </td>
                        </tr>
                    </table>
                </div>
                <br />
                <div class="gSDMS_Grid">
                <%--<asp:GridView runat="server" ID="grdTimeSheet"></asp:GridView>--%>
                
                   <asp:GridView ID="grdTimeSheet" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%" 
                        AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false" PageSize="50" PagerSettings-Position="Bottom" PagerStyle-HorizontalAlign="Right"
                        CssClass="css_grid" DataKeyNames="TimeSheet_ID"
                        >                        
                        <AlternatingRowStyle CssClass='AlternatingRowStyle' />
                        <EditRowStyle CssClass='EditRowStyle' />
                        <FooterStyle CssClass='FooterStyle' />
                        <HeaderStyle CssClass='HeaderStyle' />
                        <PagerStyle CssClass='PagerStyle' HorizontalAlign="Right" />
                        <RowStyle CssClass='RowStyle' />
                        <SelectedRowStyle CssClass='SelectedRowStyle' />
                   
                        <Columns >
                            <asp:TemplateField HeaderText="STT" ItemStyle-CssClass="stt">
                                <ItemTemplate><%# grdTimeSheet.PageIndex * grdTimeSheet.PageSize + grdTimeSheet.Rows.Count + 1%></ItemTemplate></asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="Date" ItemStyle-CssClass="txtdate" SortExpression="Date">
                                <ItemTemplate><%#Eval("Date","{0:dd/MM/yyyy}")%></ItemTemplate></asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="Account" ItemStyle-CssClass="txtMember" SortExpression="LoginName">
                                <ItemTemplate><%#Eval("LoginName")%></ItemTemplate></asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="Project code" ItemStyle-CssClass='txtCode' SortExpression="Project_Code">
                                <ItemTemplate><%# Eval("Project_Code")%></ItemTemplate></asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="Work" ItemStyle-CssClass="txtMember" SortExpression="Work" ItemStyle-HorizontalAlign="Right">
                                <ItemTemplate><%#Eval("Work")%></ItemTemplate></asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="From" ItemStyle-CssClass="txtnum" SortExpression="From" ItemStyle-HorizontalAlign="Right">
                                <ItemTemplate><%#Eval("From")%></ItemTemplate></asp:TemplateField>
                            
                             
                            <asp:TemplateField HeaderText="To" ItemStyle-CssClass="txtnum" SortExpression="To" ItemStyle-HorizontalAlign="Right">
                                <ItemTemplate><%#Eval("To")%></ItemTemplate></asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="Hours" ItemStyle-CssClass="txtnum" SortExpression="Hours" ItemStyle-HorizontalAlign="Right">
                                <ItemTemplate><%#Eval("Hours")%></ItemTemplate></asp:TemplateField>
                                                 
                            <asp:TemplateField HeaderText="% Finish" ItemStyle-CssClass="txtPercent" SortExpression="Percent_Complete" ItemStyle-HorizontalAlign="Right">
                                <ItemTemplate><%#Eval("Percent_Complete")%></ItemTemplate></asp:TemplateField>
                            

                            <asp:TemplateField HeaderText="Description" ItemStyle-CssClass="txt" SortExpression="Description" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate><%#Eval("Description")%></ItemTemplate></asp:TemplateField>
                      
                            <asp:TemplateField HeaderText="Status" ItemStyle-CssClass="txtMember" SortExpression="TimeSheet_Status" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate><%#Eval("TimeSheet_Status")%></ItemTemplate></asp:TemplateField>
                            
                             <asp:TemplateField HeaderText="Leader" ItemStyle-CssClass="txt" SortExpression="Leader" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate><%#Eval("Leader")%></ItemTemplate></asp:TemplateField>
                            <%--<asp:TemplateField HeaderText="Check" ItemStyle-CssClass="txt" ItemStyle-HorizontalAlign="Left">
                              <HeaderTemplate >
                                 <input type="checkbox" id="chkAll" onclick="CheckUncheckAll();" />All
                              </HeaderTemplate>
                              <ItemTemplate>
                              <input type="checkbox" id='<%#Eval("TimeSheet_ID")%>' value='<%#Eval("TimeSheet_ID")%>'/>
                              </ItemTemplate>
                            </asp:TemplateField>--%>
                                           
                           <asp:TemplateField HeaderText="Edit" ItemStyle-CssClass="edit-del">
                                <ItemTemplate>
                                    <asp:ImageButton ID="btn_Edit" runat="server" CommandName="detail" CommandArgument='<%# Eval("TimeSheet_ID") %>' CssClass="delete"  ToolTip="Edit" ImageUrl="~/Data/Sites/1/skins/StandardSkin/images/edit.png"  ValidationGroup="1110000" Visible="false"/>
                                    <%--<a class="edit" href='<%# "/gsdmsmodule/timesheet/apptimesheet.aspx?pageid=16&id=" + Eval("TimeSheet_ID") %>' title="Edit">&nbsp;</a>--%>
                                </ItemTemplate></asp:TemplateField>

                            <%--<asp:TemplateField HeaderText="Del" ItemStyle-CssClass="edit-del">
                                <ItemTemplate>
                                    <asp:ImageButton ID="btnDelete" CommandName="delete" CommandArgument='<%# Eval("TimeSheet_ID") %>' CssClass="delete" runat="server" ToolTip="Delete" ImageUrl="~/Data/Sites/1/skins/StandardSkin/images/delete.png" OnClientClick="return confirm('Do you want to delete?')"/>
                                </ItemTemplate></asp:TemplateField>--%>
                        </Columns>
                        
                         <EmptyDataTemplate>
                            <div class="div_dataEmpty">Data not found!</div>
                        </EmptyDataTemplate>
                    </asp:GridView>
                    <%--<table cellpadding='3' cellspacing='0' border='0' class="tb_search" >
                    <br/>
                            <tr>
                            <td></td>
                            <td>
                                 <div class="div_AddNew div_Edit">
                                   <button id="btnExport" class="btn_01" type="reset">Export</button>
                                 </div>
                            </td>
                            </tr>
                        </table>
                  </div>--%>
<%--                </ContentTemplate>
            </asp:UpdatePanel>--%>
                
            </fieldset>

        </div>
        </portal:mojoPanel>
        <div class="cleared"></div>
    </asp:Panel>
    <mp:CornerRounderBottom id="cbottom1" runat="server" />
    </portal:mojoPanel>
</asp:Content>
<asp:Content ContentPlaceHolderID="rightContent" ID="MPRightPane" runat="server" />
<asp:Content ContentPlaceHolderID="pageEditContent" ID="MPPageEdit" runat="server" />
